//
package org.skatiger.jrove.impl.jaxb.taglib;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tag")
public class Tag {

    @XmlElement(name = "tag-name", required = true)
    protected String tagName;
    @XmlElement(name = "handler-class")
    protected String handlerClass;
    @XmlElement(name = "component-class")
    protected String componentClass;
    @XmlElement(name = "renderer-type")
    protected String rendererType;
    @XmlElement
    protected String source;
    protected List<Attribute> attribute;

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String value) {
        this.tagName = value;
    }

    public String getHandlerClass() {
        return handlerClass;
    }

    public void setHandlerClass(String value) {
        this.handlerClass = value;
    }

    public String getComponentClass() {
        return componentClass;
    }

    public void setComponentClass(String componentClass) {
        this.componentClass = componentClass;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String value) {
        this.source = value;
    }

    public String getRendererType() {
        return rendererType;
    }

    public List<Attribute> getAttribute() {
        if (attribute == null) {
            attribute = new ArrayList<Attribute>();
        }
        return this.attribute;
    }

    @Override
    public String toString() {
        return "tag-name: " + tagName + ", handler-class: " + handlerClass
                + ", component-class: " + componentClass + ", renderer-type: "
                + rendererType;
    }
}
